home *** CD-ROM | disk | FTP | other *** search
Text File | 1989-12-22 | 2.0 KB | 56 lines | [TEXT/GEOL] |
- Item 0190300 22-Dec-89 10:19
-
- From: MADA2 MacApp Dev Assoc, Curtis Faith
-
- To: MACAPP.TECH$ MacApp Technical
-
- Sub: Memory Clarifications
-
- Some MacApp memory questions,
-
- I think I have a pretty good idea how MacApp's memory scheme works but I would
- appreciate a few clarifications.
-
- Here is what I think:
-
- Permanent memory is permanent because MacApp does not know about it and hence
- cannot purge it during its GrowZone function.
-
- Temporary memory is such because MacApp has a list of all temporary handles and
- thus can purge it in the GrowZone function.
-
- Here is where I need confirmation:
-
- I believe that the important point is handle creation. That is a handle
- created via NewPermHandle will always be permanent since the implication is
- that MacApp does not know it exists. Calls to SetHandleSize, PtrAndHand,
- HandAndHand will have no effects on its status as a permanent handle. Thus:
-
- oldPerm := PermAllocation(TRUE);
- SetHandleSize(h,45);
- oldPerm := PermAllocation(oldPerm);
-
- is not necessary. Is this true? Or has MacApp patched SetHandleSize in some
- way also?
-
- What about functions such as HandToHand which makes a copy of the data
- contained in a handle and returns a new handle to the data copy. Is it
- necessary to call PermAllocation(TRUE) to insure that the new handle will not
- be added to the temporary list? My gut feeling is that it would be but I
- cannot confirm this anywhere. All I read is the vague "for other kinds of
- requests you set the 'permanent' flag to TRUE by calling PermAllocation(TRUE)".
- Does this mean that every possible handle creation is detected by some very low
- level patch to the memory manager, or just calls that at some time call
- NewHandle.
-
- Can I make the statement that any handles created with the permanent flag set
- to false will be added to the list of handles maintained by MacApp? If not
- what are the exceptions?
-
- Please feel free to dispel any misconceptions and set me straight.
-
- yours,
-
- Curtis Faith
-
-